package com.xiaolin.designmode.composite.lucency;

/**
 * @ClassName CompositeTest
 * @Description TODO
 * @Detail detail
 * @Author MyPC
 * @Date 2020/11/4
 * @Version 1.0
 */
public class CompositeTest {
    public static void main(String[] args) {
        Composite c1=new Composite();
        Composite c2=new Composite();
        Leaf l1 = new Leaf("1号");
        Leaf l2 = new Leaf("2号");
        Leaf l3 = new Leaf("3号");
        c1.add(l1);
        c1.add(c2);
        c2.add(l2);
        c2.add(l3);
        c1.operation();
    }
}
